<!DOCTYPE html>
<html>
<head>
    

    <include file="Common/head"/>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>地区管理</h5>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                
                <div class="col-sm-12">
                    <div class="table-responsive">
    
                        <include file="Common/alert"/>
                        <div class="clearfix" style="width:100%;">
                            <div class="bars pull-left">
                                <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                                    <button type="button" class="btn btn-outline btn-default" href="{:U('Auth/index')}" style="padding-bottom: 8px;padding-top: 8px;">
                                        <i class="glyphicon glyphicon-chevron-left" aria-hidden="true"></i>
                                    </button>
                                    <button class="btn btn-default btn-outline" type="button" name="refresh" title="刷新" href="__SELF__" style="padding-bottom: 8px;padding-top: 8px;">
                                        <i class="glyphicon glyphicon-repeat"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
    
    
                        <form id="form" method="post">
                            <table class="table table-hover">
                                <thead>
                                <tr>
                                    <th>
                                        <label>
                                            <input type="checkbox" name="checkAll" child="del-check">
                                            <span>全选</span>
                                        </label>
                                    </th>
                                    <th>Id</th>
                                    <th>地区名称</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="info">
                                    <tr>
                                        <th>
                                            <label style="cursor: pointer; width: 100%;height: 100%;">
                                                <input class="del-check cate_id" name="district_id[]" type="checkbox" class="checkbox" value="{$info.id}">
                                                <span></span>
                                            </label>
                                        </th>
                                        <td>{$info.id}</td>
                                        <td>{$info.title}</td>
                                    </tr>
                                </volist>
                                </tbody>
                                <input type="hidden" name="group_id" value="{:I('group_id')}">
                            </table>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                    <button class="btn btn-white" type="submit" onclick="window.history.go(-1);">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>
    
                    <ul class="pagination">
                        {$page}
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- End Panel Other -->
</div>
<include file="Common/footer"/>
<script src="__JS__/content.min.js?v=1.0.0"></script>
<script>
    +function($){
        var auth_groups = [{$authed_group}];
        $('.cate_id').each(function(){
            if( $.inArray( parseInt(this.value,10),auth_groups )>-1 ){
                $(this).prop('checked',true);
            }
        });
        $('select[name=group]').change(function(){
            location.href = this.value;
        });
    }(jQuery);
</script>
</body>
</html>
